package subtyped


sealed abstract class LType extends LTerm

case class TyBool() extends LType 
{
  override def toString = "bool"
}
case class TyInt() extends LType  
{
  override def toString = "int"
}
case class TyArr(t1: LType, t2: LType) extends LType {
  override def toString = "("+t1 +" => " +t2+")"
}

case class TyRecord(fields: List[(String,LType)]) extends LType {
  override def toString = "{" + fields.foldRight("")({case ((s,t),xs) => s +":"+ t +", "+ xs} )+ "}"
}
case class TyTop() extends LType

case class TyUnit() extends LType
{
  override def toString = "unit"
}


